<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景图</title>
    <style>
        div {
            width: 600px;
            height: 850px;
            background-image: url(../../assets/images/c罗.webp);
            background-repeat: no-repeat;
            /* background-repeat: repeat; */
            /* background-repeat: repeat-x; */
            /* background-repeat: repeat-y; */
            background-position: center center;
            /* 如果只写一个属性值 另一个默认居中 数字只会显示水平 */
            /* background-size: contain; */
            /* background-size: over; */
            background-size: 100%;
        }
        
    </style>
</head>
<body>
    <div>
        克里斯蒂亚诺罗纳尔多
    </div>
</body>
</html>